//
//  WebHtmlViewController.m
//  lianganyuchu-user
//
//  Created by iMac on 17/4/17.
//  Copyright © 2017年 杭州桑缇电子商务有限公司. All rights reserved.
//

#import "WebHtmlViewController.h"

@interface WebHtmlViewController ()

@end

@implementation WebHtmlViewController
-(instancetype)initWithTitle:(NSString *)stitle withUrl:(NSString *)url
{
    self=[super init];
    
    if (self) {
        self.navigationItem.title=stitle;
        strurl=url;
    }
    
    return self;
}
- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationItem.leftBarButtonItem=[self tbarBackButton];
    
    self.webView=[[UIWebView alloc]initWithFrame:self.view.bounds];
    self.webView.backgroundColor=WHITE_COLOR;
    self.webView.scrollView.showsVerticalScrollIndicator=NO;
    self.webView.delegate=self;
    [self.view addSubview:self.webView];
    NSURL *url =[NSURL URLWithString:strurl];
    NSURLRequest *request =[NSURLRequest requestWithURL:url];
    [self.webView loadRequest:request];
}
-(void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error
{
    NSLog(@"%@",error);
}

@end
